package com.github.phoenics.militia.bazookaFx.model;

import com.github.phoenics.militia.bazookaFx.domain.enums.TableType;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

import java.util.Date;

/**
 * @author Phoenics Chow
 * on 2019年01月31日
 */
public class AppTableModel implements IModel {
    private static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(AppTableModel.class);
    private Long id;
    private Long appId;
    private TableType tableType;
    private StringProperty tableCnName=new SimpleStringProperty();
    private StringProperty tableName=new SimpleStringProperty();
    private StringProperty tableComment=new SimpleStringProperty();
    private ObjectProperty<Date> createTime=new SimpleObjectProperty<>();
    //private ObjectProperty<Date> updateTime=new SimpleObjectProperty<>();
    @Override
    public void clear() {
        setTableCnName(null);
        setTableComment(null);
        setTableName(null);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getAppId() {
        return appId;
    }

    public void setAppId(Long appId) {
        this.appId = appId;
    }

    public String getTableCnName() {
        return tableCnName.get();
    }

    public StringProperty tableCnNameProperty() {
        return tableCnName;
    }

    public void setTableCnName(String tableCnName) {
        this.tableCnName.set(tableCnName);
    }

    public String getTableName() {
        return tableName.get();
    }

    public StringProperty tableNameProperty() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName.set(tableName);
    }

    public String getTableComment() {
        return tableComment.get();
    }

    public StringProperty tableCommentProperty() {
        return tableComment;
    }

    public void setTableComment(String tableComment) {
        this.tableComment.set(tableComment);
    }

    public Date getCreateTime() {
        return createTime.get();
    }

    public ObjectProperty<Date> createTimeProperty() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime.set(createTime);
    }

    public TableType getTableType() {
        return tableType;
    }

    public void setTableType(TableType tableType) {
        this.tableType = tableType;
    }


}
